Package testapplication

Source Code of testapplication.TestApplication

package testapplication;

import java.math.BigInteger;
import java.util.Scanner;

public class TestApplication {
    public static void main(String args[]) {
       
        int numbersCount;
        BigInteger result;
        Scanner scanner = new Scanner(System.in);
        numbersCount = scanner.nextInt();
        result = scanner.nextBigInteger();
       
        BigInteger currentNumber;
       
        for (int i = 0; i < numbersCount - 1; i += 1) {
            currentNumber = scanner.nextBigInteger();
            result = result.xor(currentNumber);
        }
       
        System.out.println(result);
    }
}
TOP

Related Classes of testapplication.TestApplication

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.